package b1.mobile.blackberry.ui.component;

import net.rim.device.api.i18n.Locale;
import net.rim.device.api.ui.Graphics;
import net.rim.device.api.ui.XYEdges;
import net.rim.device.api.ui.decor.BackgroundFactory;
import net.rim.device.api.ui.decor.Border;
import net.rim.device.api.ui.decor.BorderFactory;

public class PasswordEditField extends
		net.rim.device.api.ui.component.PasswordEditField {

	static XYEdges borderPadding = new XYEdges(8, 8, 8, 8);
	static int frontColor = 0x00808080;
	static int backColor = 0x00FFFFFF;
	static int borderStyle = Border.STYLE_SOLID;
	
	Border border = BorderFactory.createRoundedBorder(borderPadding, frontColor, borderStyle);
	
	private int width;
	private int height;
	
	public PasswordEditField() {
		super();
//		setBackground(BackgroundFactory.createSolidBackground(backColor));
		setBorder(border);
	}
	
	public PasswordEditField(int width) {
		this();
		this.width = width;
		this.height = getFont().getHeight();
	}
	
	public int getPreferredWidth() {
		return this.width;
	}
	
	public int getPreferredHeight() {
		return this.height;
	}
	
	public Locale getPreferredInputLocale() {
		// TODO Auto-generated method stub
		return null;
	}

	public int getTextInputStyle() {
		// TODO Auto-generated method stub
		return 0;
	}

	public boolean isUnicodeInputAllowed() {
		// TODO Auto-generated method stub
		return false;
	}

	public void updateInputStyle() {
		// TODO Auto-generated method stub

	}
	
	protected void paint(Graphics g) {
		g.setColor(frontColor);
		super.paint(g);
	}

}
